import { getContent } from "@/http/api";

function getCateFn(type) {
  let promise1 = new Promise((resolve, reject) => {
    getContent({ type: type }).then((res) => {
      if (res.data.code == 1) {
        let result = res.data.data;
        resolve(result);
      } else {
        resolve([]);
      }
    });
  });
  return promise1;
}

export default {
  getCateFn,
};
